'use strict';

/**
 * @description 服务菜单接口
 * @param {Object}  ctx 函数的执行上下文
 * @param {Object}  args 前端传递过来的参数
 */

const db = uniCloud.database();
const collection = db.collection('menu');
const { SuccessModel, ErrorModel } = require('status-modal');
exports.main = async (event, context) => {
	const list = await collection.get();
	return new SuccessModel('获取成功', list.data);
};
